Method: TimePieces::TimeSet#>>
- Defined in:
- lib/time_pieces/time_set.rb
#>>(subtracting_td) ⇒ Object
30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 |
# File 'lib/time_pieces/time_set.rb', line 30 def >>(subtracting_td) new_tds = [] time_durations.each do |td| if subtracting_td.overlaps?(td) combined_td = td - subtracting_td combined_td.time_durations.each do |td3| new_tds << td3 end else new_tds << td end end self.time_durations = new_tds return self end |